<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<meta content="telephone=no" name="format-detection">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<title>我的活动</title>
		<link href="__PUBLIC__/Weixin/bargain/css/global.css" rel="stylesheet" type="text/css" /><link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/bootstrap/css/bootstrap.min.css">
		<link href="__PUBLIC__/Weixin/bargain/css/global2.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="__PUBLIC__/Weixin/bargain/js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/Weixin/bargain/js/global.js"></script>
		<link href="__PUBLIC__/Weixin/bargain/css/bargain.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="__PUBLIC__/Weixin/bargain/js/bargain.js"></script>
		<link href="__PUBLIC__/Weixin/bargain/css/idangerous.swiper.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="__PUBLIC__/Weixin/bargain/js/idangerous.swiper-1.9.1.min.js"></script>
	</head>
	<body>
		<div id="member_menu">
			我的活动
			<a href="{:U('Bargain/my',array('token'=>$token))}" class="account"><img src="__PUBLIC__/Weixin/bargain/images/bargain/back.png"></a>
			<a href="{:U('Bargain/home',array('token'=>$token))}" class="home"><img src="__PUBLIC__/Weixin/bargain/images/bargain/home_icon.png"></a>
		</div>
		<div class="member_menu_blank"></div>
		<div id="activity_list">
			<?php foreach($order_list as $vo){?>
			<div class="items" id="order<?php echo $vo['orderid'];?>">
				<div class="cont">
					<div class="img"><a href="<?php echo U("Bargain/index",array("token"=>$token,"id"=>$vo['bargain_id']));?>"><img src="<?php echo $vo['bargain_logoimg'];?>" alt=""></a></div>
					<div class="info">
						<div class="name"><a href="<?php echo U("Bargain/index",array("token"=>$token,"id"=>$vo['bargain_id']));?>"><?php echo $vo['bargain_name'];?></a></div>
						<div class="price">底价:<span class="pd_r5"><i>￥</i><?php echo $vo['bargain_minimum'];?></span>现价:<span><i>￥</i><?php echo $vo['bargain_nowprice'];?></span></div>
					</div>
				</div>
				<?php if($vo['endtime'] > time()){?>
				<?php if($vo['isday'] == 'yes'){?>
				<div class="countdown"><font class="stock">库存<?php echo $vo['bargain_inventory'];?></font>倒计时:<span class="day"><?php echo $vo['day']?></span>天<span class="hour"><?php echo $vo['hour']?></span>时<span class="minute"><?php echo $vo['minute']?></span>分<span class="second" style="display:none"><?php echo $vo['second']?></span></div>
				<script>
					$(function(){
						daoshi<?php echo $vo['orderid'];?>();
					});
					var day<?php echo $vo['orderid'];?> = <?php echo $vo['day'];?>;
					var hour<?php echo $vo['orderid'];?> = <?php echo $vo['hour'];?>;
					var minute<?php echo $vo['orderid'];?> = <?php echo $vo['minute'];?>;
					var second<?php echo $vo['orderid'];?> = <?php echo $vo['second'];?>;
					function daoshi<?php echo $vo['orderid'];?>(){
						if(second<?php echo $vo['orderid'];?> < 0){
							second<?php echo $vo['orderid'];?> = 59;
							minute<?php echo $vo['orderid'];?>--;
						}
						if(minute<?php echo $vo['orderid'];?> < 0){
							minute<?php echo $vo['orderid'];?> = 59;
							hour<?php echo $vo['orderid'];?>--;
						}
						if(hour<?php echo $vo['orderid'];?> < 0){
							hour<?php echo $vo['orderid'];?> = 59;
							day<?php echo $vo['orderid'];?>--;
						}
						if(second<?php echo $vo['orderid'];?> < 10){
							$('#order<?php echo $vo['orderid'];?> .second').html('0'+second<?php echo $vo['orderid'];?>);
						}else{
							$('#order<?php echo $vo['orderid'];?> .second').html(second<?php echo $vo['orderid'];?>);
						}
						if(minute<?php echo $vo['orderid'];?> < 10){
							$('#order<?php echo $vo['orderid'];?> .minute').html('0'+minute<?php echo $vo['orderid'];?>);
						}else{
							$('#order<?php echo $vo['orderid'];?> .minute').html(minute<?php echo $vo['orderid'];?>);
						}
						if(hour<?php echo $vo['orderid'];?> < 10){
							$('#order<?php echo $vo['orderid'];?> .hour').html('0'+hour<?php echo $vo['orderid'];?>);
						}else{
							$('#order<?php echo $vo['orderid'];?> .hour').html(hour<?php echo $vo['orderid'];?>);
						}
						if(day<?php echo $vo['orderid'];?> < 10){
							$('#order<?php echo $vo['orderid'];?> .day').html('0'+day<?php echo $vo['orderid'];?>);
						}else{
							$('#order<?php echo $vo['orderid'];?> .day').html(day<?php echo $vo['orderid'];?>);
						}
						if(day<?php echo $vo['orderid'];?> < 2){
							location.reload();
						}else{
							second<?php echo $vo['orderid'];?>--;
							setTimeout("daoshi<?php echo $vo['orderid'];?>()",1000);
						}
					}
				</script>
				<?php }else{?>
				<div class="countdown"><font class="stock">库存<?php echo $vo['bargain_inventory'];?></font>倒计时:<span class="hour"><?php echo $vo['hour']?></span>时<span class="minute"><?php echo $vo['minute']?></span>分<span class="second"><?php echo $vo['second']?></span>秒</div>
				<script>
					$(function(){
						daoshi<?php echo $vo['orderid'];?>();
					});
					var hour<?php echo $vo['orderid'];?> = <?php echo $vo['hour'];?>;
					var minute<?php echo $vo['orderid'];?> = <?php echo $vo['minute'];?>;
					var second<?php echo $vo['orderid'];?> = <?php echo $vo['second'];?>;
					function daoshi<?php echo $vo['orderid'];?>(){
						if(second<?php echo $vo['orderid'];?> < 0){
							second<?php echo $vo['orderid'];?> = 59;
							minute<?php echo $vo['orderid'];?>--;
						}
						if(minute<?php echo $vo['orderid'];?> < 0){
							minute<?php echo $vo['orderid'];?> = 59;
							hour<?php echo $vo['orderid'];?>--;
						}
						if(second<?php echo $vo['orderid'];?> < 10){
							$('#order<?php echo $vo['orderid'];?> .second').html('0'+second<?php echo $vo['orderid'];?>);
						}else{
							$('#order<?php echo $vo['orderid'];?> .second').html(second<?php echo $vo['orderid'];?>);
						}
						if(minute<?php echo $vo['orderid'];?> < 10){
							$('#order<?php echo $vo['orderid'];?> .minute').html('0'+minute<?php echo $vo['orderid'];?>);
						}else{
							$('#order<?php echo $vo['orderid'];?> .minute').html(minute<?php echo $vo['orderid'];?>);
						}
						if(hour<?php echo $vo['orderid'];?> < 10){
							$('#order<?php echo $vo['orderid'];?> .hour').html('0'+hour<?php echo $vo['orderid'];?>);
						}else{
							$('#order<?php echo $vo['orderid'];?> .hour').html(hour<?php echo $vo['orderid'];?>);
						}
						if(hour<?php echo $vo['orderid'];?> < 0){
							$('#order<?php echo $vo['orderid'];?> .second').html('00');
							$('#order<?php echo $vo['orderid'];?> .minute').html('00');
							$('#order<?php echo $vo['orderid'];?> .hour').html('00');
							location.reload();
						}else{
							second<?php echo $vo['orderid'];?>--;
							setTimeout("daoshi<?php echo $vo['orderid'];?>()",1000);
						}
					}
				</script>
				<?php }?>
				<?php }else{?>
				<div class="countdown"><font class="stock">库存<?php echo $vo['bargain_inventory'];?></font>倒计时:<span class="hour">00</span>时<span class="minute">00</span>分<span class="second">00</span>秒</div>
				<?php }?>
			</div>
			<?php }?>
		</div>
		<footer>
			<ul>
				<li><a href="{:U('Bargain/home',array('token'=>$token,'type'=>'0'))}">全部</a></li>
				<li><a href="{:U('Bargain/home',array('token'=>$token,'type'=>'1'))}">最新</a></li>
				<li><a href="{:U('Bargain/home',array('token'=>$token,'type'=>'2'))}">最热</a></li>
				<li class="hover"><a href="{:U('Bargain/my',array('token'=>$token))}">我的</a></li>
			</ul>
		</footer>
	</body>
</html>